module counter_num1_8bit(
	input [7:0] Cin,
	output reg[3:0] Num
);

	integer i;
	reg[7:0] temp;

	always @(Cin) begin
		
		temp = Cin;
		Num = 0;
		for(i = 0; i < 8; i = i+1) begin
			if(temp[0]) begin
				Num = Num + 1;
			end
			temp = temp >> 1;
		end
	end

endmodule
